<!-- Main content -->
<section class="content">
	<div class="row">
		<!-- right column -->
		<div class="col-md-12">
		
			<!-- general form elements disabled -->
			<div class="box box-alegro">
			
				<div class="box-body">
					<form role="form" method="post" action="<?php echo base_url('cliente/atualizar'); ?>">
						<?php 
							if (validation_errors()) {
								$html = '<div class="alert alert-danger alert-dismissable">
											<i class="fa fa-warning"></i>' . validation_errors() . '</div>';
								echo $html;
							}
							if ($this->session->flashdata('adicionarok')){
								$html = '<div class="alert alert-success alert-dismissable">
											<i class="fa fa-check"></i>' . $this->session->flashdata('adicionarok') . '</div>';
								echo $html;
							}
							echo form_hidden('cli_codigo', '{cli_codigo}');
						?>
						<!-- text input -->
						<div class="row">
							<div class="form-group col-md-5">
								<label>Nome</label>
								<input type="text" name="cli_nome" value="{cli_nome}" class="form-control" placeholder="Nome do Cliente" /> 
								<?php 
								//echo form_input(array('name'=>'cli_nome', 'class'=>'form-control', 'placeholder'=>'Nome do Cliente'),'{cli_nome}','autofocus');
								?>
							</div>
							<div class="form-group col-md-4">
								<label>Endereço</label> 
								<?php 
								echo form_input(array('name'=>'cli_endereco', 'class'=>'form-control', 'placeholder'=>'Endereço'),'{cli_endereco}');
								?>
							</div>
							<div class="form-group col-md-3">
								<label>Complemento</label> 
								<?php 
								echo form_input(array('name'=>'cli_complemento', 'class'=>'form-control', 'placeholder'=>'Complemento'),'{cli_complemento}');
								?>
							</div>
						</div>
						
						<div class="row">
							<div class="form-group col-md-3">
								<label>Bairro</label>
								<?php 
								echo form_input(array('name'=>'cli_bairro', 'class'=>'form-control', 'placeholder'=>'Bairro'),'{cli_bairro}');
								?> 
							</div>
							<div class="form-group col-md-2">
								<label>UF</label> 
								<?php 
								//$estado = array('1'=>'Pernambuco', '2'=>'Alagoas', '3'=>'Ceará', '4'=>'São Paulo', '5'=>'Rio Grande do Sul',);
								echo form_dropdown('est_codigo', $estados, $est_codigo, 'class="form-control"');
								?>
							</div>
							<div class="form-group col-md-3">
								<label>Cidade</label> 
								<?php 
								//$cidade = array('1'=>'Recife', '2'=>'Olinda', '3'=>'Moreno', '4'=>'Carpina', '5'=>'Joboatão dos Guararapes',);
								echo form_dropdown('cid_codigo', $cidades, $cid_codigo, 'class="form-control"');
								?>
							</div>
							<div class="form-group col-md-2">
								<label>CEP</label> 
								<?php 
								echo form_input(array('name'=>'cli_cep', 'class'=>'form-control', 'placeholder'=>'CEP'),'{cli_cep}');
								?>
							</div>
							<div class="form-group col-md-2">
								<label>Tipo de Cliente</label> 
								<?php 
								$tipo = array('1'=>'Pessoa Física', '2'=>'Pessoa Jurídica',);
								echo form_dropdown('tpcli_tipo',$tipo, $tpcli_tipo, 'class="form-control"');
								?>
							</div>
						</div>
						
						<div class="row">
							<div class="form-group col-md-4">
								<label>Nome Fantasia</label>
								<?php 
								echo form_input(array('name'=>'cli_fantasia', 'class'=>'form-control', 'placeholder'=>'Nome Fantasia'),'{cli_fantasia}');
								?>
							</div>
							<div class="form-group col-md-3">
								<label>Inscrição</label> 
								<?php 
								echo form_input(array('name'=>'cli_inscricao', 'class'=>'form-control', 'placeholder'=>'Inscrição'),'{cli_inscricao}');
								?>
							</div>
							<div class="form-group col-md-3">
								<label>CPF / CNPJ</label> 
								<?php 
								echo form_input(array('name'=>'cli_cgc', 'class'=>'form-control', 'placeholder'=>'CGC'),'{cli_cgc}');
								?>
							</div>
						</div>
						
						<div class="row">
							<div class="form-group col-md-4">
								<label>Contato</label> 
								<?php 
								echo form_input(array('name'=>'cli_contato', 'class'=>'form-control', 'placeholder'=>'Contato'),'{cli_contato}');
								?>
							</div>
							<div class="form-group col-md-3">
								<label>Fone</label> 
								<?php 
								echo form_input(array('name'=>'cli_fone', 'class'=>'form-control', 'placeholder'=>'Fone'),'{cli_fone}');
								?>
							</div>
							<div class="form-group col-md-3">
								<label>E-mail</label> 
								<?php 
								echo form_input(array('name'=>'cli_email', 'class'=>'form-control', 'placeholder'=>'E-mail'),'{cli_email}');
								?>
							</div>
						</div>
						
						<div class="row">
							<!-- textarea -->
							<div class="form-group col-md-12">
								<label>Observação</label>
								<?php
								echo form_textarea(array('name'=>'cli_observacao', 'class'=>'form-control', 'rows'=>'3', 'placeholder'=>'Digite aqui uma observação'),'{cli_observacao}'); 
								?>
							</div>
						</div>

						<button type="submit" class="btn btnAdminAlegro">{botaopadrao}</button>
						<button type="reset" class="btn btnAdminAlegro">{botaolimpar}</button>
						<button type="button" class="btn btnAdminAlegro" onClick="history.go(-1)">{botaocancelar}</button>
					</form>
				</div>
				<!-- /.box-body -->
				
			</div>
			<!-- /.box -->
		</div>
		<!--/.col (right) -->
	</div>
	<!-- /.row -->
</section>
<!-- /.content -->
